<?
$tmppath="../../";
REQUIRE ($tmppath."include/login.php");
REQUIRE ($tmppath."$templates/up.php");
REQUIRE($tmppath."protect/connect.php");

require("../fonction.php");
TITRE_JEU("Invitation Alliance");
$query ="SELECT alliance_name,alliance_date_crea, alliance_description,alliance_charte,alliance_cacher,alliance_createur,alliance_site FROM sdalliance WHERE alliance_id=$alliance";
$resultat=mysql_query($query);
$row = mysql_fetch_array($resultat);
$nom =$row[0];










?>

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td> 
      <table width="99%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000" >
        <tr> 
          <td  background="../../templates/default/FondS.jpg"><div align="center"></div>
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
              <tr background="../../templates/default/FondC.jpg"> 
                <td width="100%" background="../../site/templates/default/FondS.jpg"> 
                  <div align="center">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td> <div align="center"><strong><em><font color="#FFFF00" size="4">Choisissez 
                            La personne a invit&eacute; dans l'alliance.</font></em></strong></div>
                          </td>
                      </tr>
                    </table>
                    <strong><em></em></strong></div></td>
              </tr>
              <tr background="../../templates/default/Fond.jpg"> 
                <td background="../../templates/default/Fond.jpg"><div align="right"> 
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td colspan="2"><div align="center">
                            <form name="form1" method="post" action="option_test.php">
                              <p>
                                <select name="invite">
                                  <?
$query ="SELECT count(*) FROM sdville WHERE conn_joueur=$userperso";
$resultat=mysql_query($query);
$row = mysql_fetch_array($resultat);

//Si il n'y a personne dans sa liste de connaissance.
IF ($row[0]==0){

}
//Sinon si il y a des gens dans la liste de connaissance.
{


$query ="SELECT  conn_seigneur FROM sdconns WHERE conn_joueur=$userperso";
$resultat=mysql_query($query);

WHILE ($tmp=mysql_fetch_row($resultat)){


//On imprime ce joueur.


$query ="SELECT perso_name,perso_alliance FROM sduser_perso WHERE perso_id=$tmp[0] ORDER BY perso_name";
$resultat2=mysql_query($query);
$row = mysql_fetch_array($resultat2);

IF (empty($row[1])){
echo"<option  value=\"$tmp[0]\">$row[0]</option>";
}

//$query ="SELECT count(*) FROM SDville WHERE ville_proprio=$userperso";
//$resultat2=mysql_query($query);
//$row = mysql_fetch_array($resultat2);
$nbr_ville=$row[0];

}
//Fin du while

}//Fin du else.
?>
                                </select>
                                <br>
                                <br>
<?
echo"<input name=\"$SID\" type=\"hidden\" id=\"$SID\" value=\"$SID\">";
echo"<input name=\"mode\" type=\"hidden\" id=\"mode\" value=\"invite_alliance\">";
echo"<input name=\"userperso\" type=\"hidden\" id=\"userperso\" value=\"$userperso\">"; 
echo"<input name=\"name\" type=\"hidden\" id=\"name\" value=\"$nom\">"; 

?>								
                                <input type="submit" name="Submit" value="Envoyer">
                              </p>
                              <table width="75%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000" >
                                <tr> 
                                  <td  background="../../templates/default/FondS.jpg"><div align="center"></div>
                                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
                                      <tr background="../../templates/default/FondC.jpg"> 
                                        <td width="100%" background="../../templates/default/FondS.jpg"> 
                                          <div align="center"><strong><em><font color="#FFFF00" size="4">Info:</font></em></strong></div></td>
                                      </tr>
                                      <tr background="../../templates/default/Fond.jpg"> 
                                        <td background="../../templates/default/Fond.jpg"><div align="right"> 
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                              <tr> 
                                                <td> <div align="right"><font color="#CCCCCC" size="2"></font></div>
                                                  <font color="#CCCCCC" size="2">Attention, La 
                                                  liste est repr&eacute;sentative 
                                                  des personnes susseptible de 
                                                  pouvoir rejoindre une alliance. 
                                                  Il ce peut qu'une personne ou 
                                                  une autre ne puisse &ecirc;tre 
                                                  invit&eacute; pour une raison 
                                                  connue d'elle meme.</font></td>
                                              </tr>
                                            </table>
                                          </div></td>
                                      </tr>
                                    </table></td>
                                </tr>
                              </table>
                              <p align="left">&nbsp; </p>
                            </form>
                          </div></td>
                      </tr>
                    </table>
                  </div></td>
              </tr>
            </table></td>
        </tr>
      </table> 
      <div align="center"><img src="../../templates/default/ligne.png" width="390" height="35"> 
      </div>
      <p>&nbsp;</p>
      <p>&nbsp;</p></td>
  </tr>
</table>
</body>
</html>
